﻿// $Id: Category.cs 10 2008-02-29 15:58:02Z mcartoixa $
/*
 *  Copyright (C) 2007 Noury Solutions
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 3 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 */
/*! \file
 * \brief Definition of \c Salamanca.DataActivities.UI.Category.
 *
 * \author $Author: mcartoixa $
 * \date $Date: 2008-02-29 16:58:02 +0100 (ven., 29 févr. 2008) $
 * \version $Revision: 10 $
 */

#if (!NET_CF)
using System;
using System.ComponentModel;
using System.Text;

namespace Salamanca.DataActivities.UI
{



    ///////////////////////////////////////////////////////////////////////////
    ///
    /// <summary>Specifies the name of the category in which to group the property or event
    /// when displayed in a PropertyGrid control set to Categorized mode.</summary>
    /// 
    ///////////////////////////////////////////////////////////////////////////

    internal sealed class SRCategoryAttribute:
        CategoryAttribute
    {

        /// <summary>Initializes a new instance of the <see cref="SRCategoryAttribute" /> class.</summary>
        public SRCategoryAttribute():
            base()
        {
        }

        /// <summary>Initializes a new instance of the <see cref="SRCategoryAttribute" /> class.</summary>
        public SRCategoryAttribute(string category):
            base(category)
        {
        }

        /// <summary>Looks up the localized name of the specified category.</summary>
        /// <param name="value">The identifer for the category to look up.</param>
        /// <returns>The localized name of the category.</returns>
        protected override string GetLocalizedString(string value)
        {
            return Resources.SR.ResourceManager.GetString(value, Resources.SR.Culture);
        }
    }
}
#endif
